namespace('js.lang');

js.lang.ClassDefinition = function() {
  if (arguments.length < 2) {
    throw new js.lang.IllegalArgumentException('At least you need to provide a class name and a class definition.');
  }
  var i = 0;
  this._className = arguments[i++];
  if (arguments[i].$class && arguments[i].$class.getCanonicalClassName() == 'js.lang.Extends') {
    this._superClass = arguments[i++];
    this._classDefinition = arguments[i++];
  } else {
    this._classDefinition = arguments[i++];
  }
  this._abstract = false;
  this.$class = new js.lang.Class('js.lang.ClassDefinition');
};

js.lang.ClassDefinition.prototype = {
  getClassName: function() {
    return this._className;
  },

  getSuperClass: function() {
    return this._superClass;
  },

  getClassDefinition: function() {
    return this._classDefinition;
  },

  isAbstract: function() {
    return this._abstract;
  }
};